HTML5 Solutions: Essential Techniques for HTML5 Developers by Marco Casario Peter Elst Charles Brown Nathalie Wormser & Cyril Hanquez

HTML5 Solutions: Essential Techniques for HTML5 Developers by Marco Casario Peter Elst Charles Brown Nathalie Wormser & Cyril Hanquez

Author:Marco Casario, Peter Elst, Charles Brown, Nathalie Wormser & Cyril Hanquez
Language: eng
Format: epub
Publisher: Apress®
Published: 2011-07-03T16:00:00+00:00


At the time of this writing, only the 2D context is supported in the HTML5 specifications, so we will only discuss this context. It's worth noting, however, that wide progress has been made in the use of a 3D context through WebGL support, which shows great promise for handling 3D graphics in the canvas element. We expect that fairly soon it will be available as well, opening new and amazing HTML5 possibilities.

Get a reference to your 2D context by using the getContext() method of the canvas object you retrieved from the DOM, as follows:

var context=canvas.getContext('2d');

Then, through its context, you can use the set of tools available in its drawing API, such as:

Transformations (including scale and rotate)

Shadows

Complex shapes, including Bezier curves and arcs (see Chapter 6)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.